const state = {
    list: [],
    page: {}
}
const actions = {
    saveList: ({ commit }, payload) => {
        commit('SAVELIST', payload)
    }
}
const mutations = {
    SAVELIST: (state, payload) => {
        state.list = payload.result
        state.page = {
            size: 10,
            number: payload.number || 1,
            total: payload.resultNum
        }
    }
}

const getters = {
    getRoles: state => state.roles
}

export default {
    state,
    mutations,
    actions,
    getters
}